package com.sharif.cn;

import reactor.core.publisher.Mono;

public class MonoDemo {
    public static void main(String[] args) {
        SimplePublisher publisher = new SimplePublisher();
        Mono.from(publisher)
                .subscribe(new BusinessSubscriber(5));

        for (int i = 0; i < 5; i++) {
            publisher.publish(i);
        }
    }
}
